﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ProjectDirector.Domain.Entities
{
    [MetadataType(typeof(AddressMetadata))]
    public partial class Address
    {
        public class AddressMetadata
        {
            [Display(Name = "House number or House name")]
            [Required(ErrorMessage = "This is a required field")]
            public string Address1 { get; set; }

            [Display(Name="Street")]            
            public string Address2 { get; set;}

            [Display(Name = "Town")]
            public string Town { get; set; }

            [Display(Name = "Postal Code")]
            [Required(ErrorMessage = "Postal code is required field")]
            public string PostalCode { get; set; }

            [Display(Name = "Country")]
            [Required(ErrorMessage = "Country is required field")]
            public int CountryId { get; set; }
        }
    }
}
